package com.haina.shop.controller.index;

import com.haina.shop.result.ServiceResult;
import com.haina.shop.service.DailyCrazyDealsService;
import com.haina.shop.vo.PageVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.xml.ws.Service;


@RestController
@RequestMapping("/prod")
public class DailyCrazyDealsController {

    @Resource
    private DailyCrazyDealsService dailyCrazyDealsService;
    @ResponseBody
    @GetMapping("moreBuyProdList")
    public ServiceResult Page(@RequestParam("current") String current,
                              @RequestParam("size") String size) {
        PageVo pageVo = new PageVo();
        pageVo.setCurrent(Long.parseLong(current)-1);
        pageVo.setSize(Long.parseLong(size));

        PageVo pageVo1 = dailyCrazyDealsService.pageSelect(pageVo);

        return ServiceResult.success(pageVo1);
    }


}
